const handleVerifyCode = async () => {
  try {
    const response = await request.post('/api/auth/verify-code', {
      phone: phone.value,
      code: verificationCode.value
    })

    if (response.data.success) {
      // 存储token
      localStorage.setItem('token', response.data.token)
      
      // 更新用户状态
      const userStore = useUserStore()
      await userStore.updateUserState()
      
      // 显示成功提示
      ElMessage.success('登录成功')
      
      // 跳转到首页
      router.push('/')
    } else {
      ElMessage.error(response.data.message || '验证失败')
    }
  } catch (error) {
    console.error('验证码验证失败:', error)
    ElMessage.error('验证失败，请重试')
  }
} 